/*
 * @Author: xiawang1024
 * @Date: 2023-04-10 15:41:02
 * @LastEditTime: 2023-04-11 09:09:52
 * @LastEditors: xiawang1024
 * @Description:
 * @FilePath: /rollup-lib/rollup.config.mjs
 * 工作，生活，健康
 */
import path from 'path'
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import typescript from '@rollup/plugin-typescript'
import builds from './config/builds.mjs'
import { fileURLToPath } from 'url'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)

export default {
  input: path.join(__dirname, '/src/index.ts'),
  output: builds,
  plugins: [
    typescript(),
    commonjs({
      transformMixedEsModules: true,
    }),
    resolve(),
  ],
}
